<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <title>Code View</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <link href="../../stylesheet.css" type="text/css" rel="stylesheet"/>
<link href="../../page_styles1.css" type="text/css" rel="stylesheet"/>

  


<link href="../../calibreHtmlOutBasicCss.css" type="text/css" rel="stylesheet" />

</head>
<body>

<div class="calibreMeta">
  <div class="calibreMetaTitle">
  
  
    
    <h1>
      <a href="../../../index.html">Sigil User Guide
</a>
    </h1>
    
    
  
  </div>
  <div class="calibreMetaAuthor">
    0.7.2

  </div>
</div>

<div class="calibreMain">

  <div class="calibreEbookContent">
    
      <div class="calibreEbNavTop">
        
          <a href="book_view.html" class="calibreAPrev">previous page</a>
        

        
          <a href="preview.html" class="calibreANext"> next page</a>
        
      </div>
    

    
  <h2 id="code_view" class="calibre5">Code View</h2>

  <p class="h2subheading">— Direct HTML Editing —</p>

  <p class="calibre1">Code View allows you to directly edit the HTML code included in your EPUB and is the most common way to edit files for advanced users.</p>

  <p class="calibre1">Switch to Code View by clicking the Code View button <img alt="" src="../Images/view-code_22px.png" class="calibre7"/>, selecting the menu item <span class="shortcut">View→Code View</span> or its keyboard shortcut:</p>

  <div class="image"><img alt="" src="../Images/code-view-mac.png" class="calibre7"/></div>

  <div class="tip">
    <p class="tiptext">You can toggle between Book View and Code View by using the keyboard shortcut <span class="menuitem">F2</span> or by double-clicking on the current tab’s name.</p>

    <p class="tiptext">You can also use the <a href="../Text/preview.html">Preview</a> window to display a read-only book view version of the page you are editing in Code View.</p>
  </div>

  <p class="calibre1">Code View is very powerful, but you must be careful when editing it to ensure you enter valid HTML code.</p>

  <div class="tip">
    <p class="tiptext">When switching from Code View to Book View or saving your file, Sigil will check if your code has any major errors. If there are any errors you will be prompted to correct them Manually or Automatically. You should usually choose Manually to fix the issue to avoid any chance of the Automatic correction deleting text.</p>
  </div>

  <p class="calibre1">In addition to displaying your HTML code exactly as it is in your EPUB, Code View highlights tags and elements in colors to make it easier to read and identify issues.</p>

  <div class="tip">
    <p class="tiptext">You can change the colors used for highlighting in Code View using <a href="../Text/preferences.html#preferences_appearance">Preferences</a>.</p>
  </div>

  <h3 class="sigilnotintoc">Formatting</h3>

  <p class="calibre1">All of the buttons on the <a href="../Text/user_interface.html#formatting_toolbar">formatting toolbar</a> are available for you to use.</p>

  <h3 class="sigilnotintoc">Context Menu</h3>

  <p class="calibre1">Right-click on text to see a context menu which includes the following options:</p>

  <ul class="calibre3">
    <li class="calibre4"><span class="listheading">Clips:</span> Select from any text <a href="../Text/clips.html">Clips</a> you have defined.</li>

    <li class="calibre4"><span class="listheading">Add To Clips:</span> Save the selected text to your Clips.</li>

    <li class="calibre4"><span class="listheading">Go To Link Or Style:</span> Same as Search→Go to Link or Style.</li>

    <li class="calibre4"><span class="listheading">Mark Selected Text:</span> Same as Search→Mark Selected Text. May also show Unmark Marked Text.</li>

    <li class="calibre4">
      <span class="listheading">Reformat HTML:</span>

      <ul class="calibre6">
        <li class="calibre4"><span class="listheading">Clean Source:</span> Clean the current file using your preferences.</li>

        <li class="calibre4"><span class="listheading">Clean Source – All HTML Files:</span> Clean all HTML files using your preferences.</li>

        <li class="calibre4"><span class="listheading">To Valid HTML:</span> Modify the current file to make it valid HTML if they aren’t already.</li>

        <li class="calibre4"><span class="listheading">To Valid HTML – All HTML Files:</span> Modify all HTML files to make them valid HTML if they aren’t already.</li>
      </ul>
    </li>
  </ul>

  <p class="calibre1">Right-click on a misspelled word to see these options:</p>

  <ul class="calibre3">
    <li class="calibre4"><span class="listheading"><i class="calibre10">suggestions</i>:</span> Select from suggested alternatives.</li>

    <li class="calibre4"><span class="listheading">Add To Default Dictionary:</span> Save the word to the default dictionary selected in Preferences.</li>

    <li class="calibre4"><span class="listheading">Add To Dictionary:</span> Save the word to the dictionary you select from the submenu.</li>

    <li class="calibre4"><span class="listheading">Ignore:</span> Skip spell checking this word until Sigil is restarted.</li>
  </ul>

  <p class="calibre1">Right-click on an image to see these options:</p>

  <ul class="calibre3">
    <li class="calibre4"><span class="listheading">View Image:</span> Displays the image in a resizable window. You can also Ctrl Click on the filename or use the Go To Link Or Style shortcut. View Image will resize the image to fit the window, and can remain open while you edit.</li>

    <li class="calibre4"><span class="listheading">Open Tab For Image:</span> Opens the image file in a tab at full resolution.</li>
  </ul>

  <p class="calibre1">Plus the usual options:</p>

  <ul class="calibre3">
    <li class="calibre4">Undo</li>

    <li class="calibre4">Redo</li>

    <li class="calibre4">Cut</li>

    <li class="calibre4">Copy</li>

    <li class="calibre4">Paste</li>

    <li class="calibre4">Delete</li>

    <li class="calibre4">Select All</li>
  </ul>



  </div>

  
  <div class="calibreToc">
    <h2><a href="../../../index.html"> Table of contents</a></h2>
     <div>
  <ul>
    <li>
      <a href="cover_picture.html">Cover</a>
    </li>
    <li>
      <a href="titlepage.html">Title Page</a>
    </li>
    <li>
      <a href="rights.html">Copyright</a>
    </li>
    <li>
      <a href="introduction.html">Introduction</a>
      <ul>
        <li>
          <a href="whats_new.html">What’s New</a>
        </li>
        <li>
          <a href="about_sigil.html">About Sigil</a>
        </li>
        <li>
          <a href="about_epub.html">About EPUB</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="installation.html">Installation</a>
    </li>
    <li>
      <a href="features.html">Features</a>
      <ul>
        <li>
          <a href="user_interface.html">User Interface</a>
        </li>
        <li>
          <a href="preferences.html">Preferences</a>
        </li>
        <li>
          <a href="opening_and_saving_files.html">Opening and Saving Files</a>
        </li>
        <li>
          <a href="book_view.html">Book View</a>
        </li>
        <li>
          <a href="code_view.html">Code View</a>
        </li>
        <li>
          <a href="preview.html">Preview</a>
        </li>
        <li>
          <a href="book_browser.html">Book Browser</a>
        </li>
        <li>
          <a href="metadata.html">Metadata</a>
        </li>
        <li>
          <a href="add_cover.html">Add Cover</a>
        </li>
        <li>
          <a href="table_of_contents.html">Table of Contents</a>
        </li>
        <li>
          <a href="validation.html">Validation</a>
        </li>
        <li>
          <a href="spellcheck.html">Spellcheck</a>
        </li>
        <li>
          <a href="media_files.html">Images, Video, Audio</a>
        </li>
        <li>
          <a href="special_characters.html">Special Characters</a>
        </li>
        <li>
          <a href="splitting_and_merging.html">Splitting and Merging</a>
        </li>
        <li>
          <a href="find_replace.html">Find &amp; Replace</a>
        </li>
        <li>
          <a href="saved_searches.html">Saved Searches</a>
        </li>
        <li>
          <a href="clips.html">Clips</a>
        </li>
        <li>
          <a href="clipboard_history.html">Clipboard History</a>
        </li>
        <li>
          <a href="links.html">Links and IDs</a>
        </li>
        <li>
          <a href="styles.html">Styles</a>
        </li>
        <li>
          <a href="indexes.html">Indexes</a>
        </li>
        <li>
          <a href="reports.html">Reports</a>
        </li>
        <li>
          <a href="external_editors.html">External Editors</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="tutorials.html">Tutorials</a>
      <ul>
        <li>
          <a href="tutorial_getting_started_with_epub.html">Getting Started With EPUB</a>
        </li>
        <li>
          <a href="tutorial_convert_to_html.html">Prepare Your File For Sigil</a>
        </li>
        <li>
          <a href="tutorial_load_file.html">Open Your File With Sigil</a>
        </li>
        <li>
          <a href="tutorial_save.html">Save Your EPUB File</a>
        </li>
        <li>
          <a href="tutorial_metadata.html">Add the Author and Title</a>
        </li>
        <li>
          <a href="tutorial_add_cover.html">Add a Cover Image</a>
        </li>
        <li>
          <a href="tutorial_split.html">Create Files For Each Chapter</a>
        </li>
        <li>
          <a href="tutorial_mark_chapters.html">Identify Your Chapters</a>
        </li>
        <li>
          <a href="tutorial_generate_toc.html">Generate A Table of Contents</a>
        </li>
        <li>
          <a href="tutorial_links.html">Create Links and Notes</a>
        </li>
        <li>
          <a href="tutorial_code_view.html">A Quick Introduction To Code View</a>
        </li>
        <li>
          <a href="tutorial_spelling.html">Check For Spelling Mistakes</a>
        </li>
        <li>
          <a href="tutorial_validate.html">Check For Errors In Your EPUB</a>
        </li>
        <li>
          <a href="tutorial_find_replace.html">Edit With Find &amp; Replace</a>
        </li>
        <li>
          <a href="tutorial_stylesheets.html">Use Stylesheets</a>
        </li>
        <li>
          <a href="tutorial_embed_fonts.html">Include Custom Fonts</a>
        </li>
        <li>
          <a href="tutorial_advanced_find.html">Advanced Find &amp; Replace – Regex</a>
        </li>
        <li>
          <a href="tutorial_regex_reference.html">Regular Expression Reference</a>
        </li>
        <li>
          <a href="tutorial_tips.html">Tips</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="faq.html">FAQ</a>
      <ul>
        <li>
          <a href="faq.html#faq_common_questions">Common Questions</a>
        </li>
        <li>
          <a href="faq.html#faq_questions">Where to Get Help</a>
        </li>
        <li>
          <a href="faq.html#faq_using_sigil">Using Sigil</a>
        </li>
        <li>
          <a href="faq.html#faq_formatting">Formatting and Styles</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="contributing_to_sigil.html">Contributing to Sigil</a>
    </li>
  </ul>
</div>


  </div>
  

  <div class="calibreEbNav">
    
      <a href="book_view.html" class="calibreAPrev">previous page</a>
    

    <a href="../../../index.html" class="calibreAHome"> start</a>

    
      <a href="preview.html" class="calibreANext"> next page</a>
    
  </div>

</div>

</body>
</html>
